package com.jbm.jbmsupplier.util;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * Created by lyh on 2017-04-07.
 */

public class BalanceEntity extends com.jbm.jbmsupplier.util.ICtrl implements Serializable {
    private static final long serialVersionUID = -4559961511987152499L;
    private int balId;
    private String balCode;
    private int orderId;
    private String type;
    private String status;
    private Timestamp createDate;
    private int createId;
    private Timestamp expireDate;
    private Timestamp closeDate;
    private Integer closeId;
    private long amount;


    public int getBalId() {
        return balId;
    }

    public void setBalId(int balId) {
        this.balId = balId;
    }

    public String getBalCode() {
        return balCode;
    }

    public void setBalCode(String balCode) {
        this.balCode = balCode;
    }


    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }


    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }


    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }


    public int getCreateId() {
        return createId;
    }

    public void setCreateId(int createId) {
        this.createId = createId;
    }

    public Timestamp getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Timestamp expireDate) {
        this.expireDate = expireDate;
    }


    public Timestamp getCloseDate() {
        return closeDate;
    }

    public void setCloseDate(Timestamp closeDate) {
        this.closeDate = closeDate;
    }


    public Integer getCloseId() {
        return closeId;
    }

    public void setCloseId(Integer closeId) {
        this.closeId = closeId;
    }


    public long getAmount() {
        return amount;
    }

    public void setAmount(long amount) {
        this.amount = amount;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BalanceEntity that = (BalanceEntity) o;

        if (amount != that.amount) return false;
        if (balId != that.balId) return false;
        if (createId != that.createId) return false;
        if (orderId != that.orderId) return false;
        if (balCode != null ? !balCode.equals(that.balCode) : that.balCode != null) return false;
        if (closeDate != null ? !closeDate.equals(that.closeDate) : that.closeDate != null) return false;
        if (closeId != null ? !closeId.equals(that.closeId) : that.closeId != null) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (expireDate != null ? !expireDate.equals(that.expireDate) : that.expireDate != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = balId;
        result = 31 * result + (balCode != null ? balCode.hashCode() : 0);
        result = 31 * result + orderId;
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + createId;
        result = 31 * result + (expireDate != null ? expireDate.hashCode() : 0);
        result = 31 * result + (closeDate != null ? closeDate.hashCode() : 0);
        result = 31 * result + (closeId != null ? closeId.hashCode() : 0);
        result = 31 * result + (int) (amount ^ (amount >>> 32));
        return result;
    }
}
